﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography;
using Mark_dal;
using Mak_model;
using System.Data;


namespace mak_bll
{
    public class luoji
    {
        private Adminlogin_dal us = new Adminlogin_dal();

        public bool UserLogin(string name, string pass)
        {
            
            return us.UserLogin(name, pass);
        }

        buygoods_dal buy = new buygoods_dal();
        public List<GoodsInfo> QueryListByCode(string code)
        {
            return buy.QueryListByCode(code);
        }

        OrderService dingdna = new OrderService();
        public bool InsertOrder(List<data> list, double totalMoney, int adminId)
        {
            return dingdna.InsertOrder(list, totalMoney,  adminId);
        }
        AdminAdd_dal AdminAdd = new AdminAdd_dal();
        public bool addadmin(string name, string pwd1)
        {
            return AdminAdd.addadmin(name,pwd1);
        
        }

        adminselect_dal adminselect = new adminselect_dal();
        public DataTable xianshi()
        {
            return adminselect.xianshi();
        }

        public DataTable ytjxianshi(string Text)
        {
            return adminselect.ytjxianshi(Text);
        }

        public int shanchu(string adminid)
        {
            return adminselect.shanchu(adminid);
        }

        yuangongadd_dal yuadd = new yuangongadd_dal();
        public bool yuanadd(string name, string pwd1)
        {
            return yuadd.addadmin(name, pwd1);

        }

        yuanselect yucha = new yuanselect();
        public DataTable xianshiyu()
        { return yucha.xianshi(); }

        public DataTable ytjxianshiyu(string Text)
        { return yucha.ytjxianshi(Text); }

        public int shanchuyu(string adminid)
        { return yucha.shanchu(adminid); }
         public int shenfen(string name, string pass)
        {
            return us.shenfen(name, pass);
        }

         upyoh_dal yh = new upyoh_dal();
         public int updateyh(string AdminName, string AdminPass, int AdminRole, int AdminStatus, int AdminId)
         {
             return yh.updateyh(AdminName, AdminPass, AdminRole, AdminStatus, AdminId);
         }


         public List<orderGoods> gettop10(DateTime start, DateTime end)
         {
             return dingdna.gettop10(start, end);
         }
         public List<orderGoods> gettop10data(string goodsCode, DateTime start, DateTime end)
         {
             return dingdna.gettop10data(goodsCode,start, end);
         }
    }
}
